; ModuleID = 'while.c'
source_filename = "while.c";target部分直接照抄，修改一些文件名
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
; Function Attrs: nofree norecurse nounwind uwtable 这句话照抄，下面定义的语句是定义main函数，参数照抄
define dso_local i32 @main() local_unnamed_addr #0 {
    ;分配空间给a,i
  %1=alloca i32,align 4;a
  %2=alloca i32,align 4;i
  ;赋值
  store i32 10, i32* %1, align 4
  store i32 0, i32* %2, align 4
  ;直接跳转
  br label %3
3:
;获取i
  %4=load i32,i32* %2,align 4
;判断条件i<10
  %5=icmp slt i32 %4,10
  ;如果%5为真，跳转到6,否则到7
  br i1 %5,label%6,label %11
6:
;获取i的值
  %7= load i32, i32* %2, align 4
  ;i++
  %8=add nsw i32 %7,1
  ;存到i本来的地址
  store i32 %8, i32* %2, align 4
  ;获取a
  %9= load i32, i32* %1, align 4
  ;计算a+i
  %10=add nsw i32 %9,%7
  ;存到a本来的地址
  store i32 %10, i32* %1, align 4
  ;跳回3
  br label %3
11:
;获取并返回a
  %12=load i32, i32* %1, align 4
  ret i32 %12
}